#ifndef __DEFINE_LOG_H
#define __DEFINE_LOG_H

void dev_debug(const char* level, const char *file_name, unsigned int line,
        const char *func_name, const char *format, ...);

#define filename(x) strrchr(x,'/')?strrchr(x,'/')+1:x



#define logv(arg...) dev_debug("Verbose", filename(__FILE__), __LINE__, __func__, ##arg)
#define logd(arg...) dev_debug("Debug",   filename(__FILE__), __LINE__, __func__, ##arg)
#define logi(arg...) dev_debug("Info",    filename(__FILE__), __LINE__, __func__, ##arg)
#define logw(arg...) dev_debug("Warn",    filename(__FILE__), __LINE__, __func__, ##arg)
#define loge(arg...) dev_debug("Error",   filename(__FILE__), __LINE__, __func__, ##arg)

#endif

